<?php  if(count($this->pagesInRange) > 1) {?>

        <!-- First page link -->
       
        <!-- Previous page link -->
    <ul>
        <?php if (isset($this->previous)): ?>
               <li><a href="?page =<?php echo $this->previous;?>">&lt;&lt; Previous</a></li> 
        <?php else: ?>
             <li><a href="#">&lt;&lt; Previous</a></li>
        <?php endif; ?>
        <!-- Numbered page links -->
        
        <?php foreach ($this->pagesInRange as $page): ?>
            <?php if ($page != $this->current): ?>
                <li><a href="?page=<?php echo $page; ?>"><?php echo $page; ?></a></li>
            <?php else: ?>
                <li class="active"><a><?php echo $page; ?></a></li>
            <?php endif; ?>
        <?php endforeach; ?>
        
        <!-- Next page link -->
        <?php if (isset($this->next)): ?>
               <li><a href="?page=<?php echo $this->next; ?>">Next &gt;&gt;</a></li>
        <?php else: ?>
            <li><a>Next &gt;&gt;</a></li>
        <?php endif; ?>
        </ul>

<?php } ?>